<template>
  <div class="col-md-12 container-fluid standard-bg">
    <div class="col-lg-1"></div>
    <div class="col-lg-10">
      <SearchItem v-for="item in animePlays" :key="item.id" :message="item.animePlay"></SearchItem>
    </div>
    <div class="col-lg-1"></div>
  </div>
</template>

<script>
import SearchItem from '../../components/search/SearchItem'
import {doSearch} from './search-js'
export default {
  name: 'Search',
  components: {SearchItem},
  data () {
    return {
      animePlays: [],
      anime: {id: 0, name: 'NULL', cover: null, score: 0, count: 2000, startTime: new Date(), info: '<p>NULL</p>', tag: 0, status: 0}
    }
  },
  mounted () {
    this.init()
  },
  computed: {
    //
  },
  methods: {
    init () {
      doSearch(this, this.$route.query['s'])
    }
  },
  watch: {
    '$route': {
      handler () {
        this.init()
      }
    }
  }
}
</script>

<style scoped>

</style>
